solutions for week1 assignment